package filepathx

import (
	"path/filepath"
	"strings"
)

// Name 获取指定路径的名字
// dir/[Name].ext
func Name(path string) (r string) {
	r = filepath.Base(path)
	ext := filepath.Ext(path)
	if ext != "" {
		r = strings.Replace(r, ext, "", -1)
	}
	return
}
